package view;

import java.awt.BorderLayout;
import java.awt.Dialog;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;

import com.toedter.calendar.JCalendar;


public class DatumAuswaehlenDialog extends JDialog {

    private static final long serialVersionUID = 1L;

    private JPanel jContentPane;

    private JCalendar calendar;

    private JButton btOK;
    private JButton btAbbrechen;


    public DatumAuswaehlenDialog(Dialog owner, boolean b) {
        super(owner);
        initialize();
        setVisible(b);
    }

    /**
     * This method initializes this
     *
     * @return void
     */
    private void initialize() {
        this.setSize(367, 202);
        this.setTitle("Datum Auswählen");
        this.setContentPane(getJContentPane());
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            JPanel buttonPanel = new JPanel(new FlowLayout());
            buttonPanel.add(getBtOK());
            buttonPanel.add(getBtAbbrechen());

            jContentPane = new JPanel(new BorderLayout());
            jContentPane.add(getCalendar(), BorderLayout.CENTER);
            jContentPane.add(buttonPanel, BorderLayout.SOUTH);
        }
        return jContentPane;
    }

    public JCalendar getCalendar() {
        if (calendar == null) {
            calendar = new JCalendar();
        }
        return calendar;
    }

    public JButton getBtOK() {
        if (btOK == null) {
            btOK = new JButton("OK");
        }
        return btOK;
    }

    public JButton getBtAbbrechen() {
        if (btAbbrechen == null) {
            btAbbrechen = new JButton("Abbrechen");
        }
        return btAbbrechen;
    }
}
